package com.pangyangyang.elasticsearch.plugin.util;

import com.pangyangyang.elasticsearch.plugin.exception.MessageRiverException;

/**
 * Created by yangwang on 2015/1/20.
 */
public class Assert {

    public static void assertNotNull(Object object, String msg){

        if (object == null){
            throwException(msg);
        }
    }

    private static void throwException(String message){

        throw  new MessageRiverException(message);
    }
}
